<?php

namespace ApiBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * File
 *
 * @ORM\Table(name="file", options={"comment":"文件表"})
 * @ORM\Entity
 */
class File
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\ManyToOne(targetEntity="ApiBundle\Entity\District")
     * @ORM\JoinColumn(name="district_id", referencedColumnName="id", nullable=true)
     */
    private $district;

    /**
     * @ORM\ManyToOne(targetEntity="ApiBundle\Entity\FileCategory")
     * @ORM\JoinColumn(name="file_category_id", referencedColumnName="id", nullable=true)
     */
    private $fileCategory;

    /**
     * @ORM\ManyToOne(targetEntity="ApiBundle\Entity\Attachment")
     * @ORM\JoinColumn(name="attachment_id", referencedColumnName="id", nullable=true)
     */
    private $attachment;

    /**
     * @var string
     *
     * @ORM\Column(name="title", type="string", length=255, options={"default":"", "comment":"文件标题"})
     */
    private $title;

    /**
     * @var string
     *
     * @ORM\Column(name="keyword", type="string", length=255, options={"default":"", "comment":"文件标题关键词"})
     */
    private $keyword;

    /**
     * @var string
     *
     * @ORM\Column(name="summary", type="string", length=50, options={"default":"", "comment":"文件概要"})
     */
    private $summary;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="created_at", type="datetime", options={"comment":"创建时间"})
     */
    private $createdAt;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="updated_at", type="datetime", nullable=true, options={"comment":"更新时间"})
     */
    private $updatedAt;

    /**
     * @var bool
     *
     * @ORM\Column(name="is_public", type="boolean", options={"default":0, "comment":"是否公开 1是 0否"})
     */
    private $isPublic;

}
